include ../var.mk
# toolchain := D:/share2/OpenOCD-20200729-0.10.0/bin/
toolchain :=
all:../$(BUILD_DIR)/$(TARGET).bin
	$(toolchain)openocd -f interface/stlink.cfg -f target/stm32f4x.cfg -c init -c "reset halt" -c "flash write_image erase ../$(BUILD_DIR)/$(TARGET).bin 0x08000000" -c "reset run" -c shutdown

debug:
	$(toolchain)openocd -f interface/stlink.cfg -f target/stm32f4x.cfg -c "bindto " -c init -c "reset halt"

